package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc WorkTaskSourceDto
 * @使用场景
 */
@Data
public class WorkTaskSourceDto extends BaseDto implements Serializable {

    /**
     * 来源标识
     */
    @ApiModelProperty("来源标识")
    private String sourceCode;

    /**
     * 来源类型
     */
    @ApiModelProperty("来源类型")
    private String sourceTypeCode;

    /**
     * 来源名称
     */
    @ApiModelProperty("来源名称")
    private String sourceName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        WorkTaskSourceDto that = (WorkTaskSourceDto) o;
        return (
                sourceCode == that.sourceCode &&
                        sourceTypeCode == that.sourceTypeCode &&
                        sourceName == that.sourceName
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                sourceCode,
                sourceTypeCode,
                sourceName
        );
    }

}
